package Control;

import java.util.Scanner;
public class Receiver {
    String input ;
    boolean received;
    public void receive(){
        if (this.received){
            return ;
        }
        Scanner scanner = new Scanner(System.in);
        this.input =  scanner.nextLine();
        this.received = true ;
    }

    public void restart(){
        this.input = "";
        this.received = false;
    }

    public String result(){
        return this.input ;
    }

    public static void main(String[] args) {
        //从1循环到10
        Receiver receiver = new Receiver();
        for (int i = 0; i < 10; i++) {
            receiver.restart();
            receiver.receive();
            System.out.println(receiver.result());
        }

    }
}
